package com.classic.core.utils;

/**
 * Created by Li.z on 2016/5/2.
 */
public class NumberUtils {

    public static float str2Float(String f){
        try {
            return Float.parseFloat(f);
        } catch (NumberFormatException e) {
            e.printStackTrace();
        }
        return 0;
    }

    public static int str2Int(String i){
        try {
            return Integer.parseInt(i);
        } catch (NumberFormatException e) {
            e.printStackTrace();
        }
        return 0;
    }

}
